package com.example.mbedtlscurl;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

//    // Used to load the 'native-lib' library on application startup.
//    static {
//        System.loadLibrary("native-lib");
//    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // Example of a call to a native method
        TextView tv = findViewById(R.id.sample_text);

            new JavaToNative().get("https://www.baidu.com", null, "", new JavaToNative.OnResponsetListener() {
            @Override
            public void onResponse(String result) {
                Log.d("MainActivity",result);
            }

            @Override
            public void onFailure(String error) {
                Log.d("MainActivity",error);
            }

            @Override
            public void onNetTimeOut() {
                Log.d("MainActivity","onNetTimeOut");
            }

            @Override
            public void onNetworkError() {
                Log.d("MainActivity","onNetworkError");
            }
        });
    }
}
